package com.moshang.blog.service;

import com.moshang.blog.entity.UploadInfo;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.security.NoSuchAlgorithmException;

/**
 * @program: blog
 * @description: 上传接口
 * @author: xieweiwei
 * @create: 2018-09-30 16:37
 **/
public interface UploadService {

    /**
     * 文件上传方法
     * @param file MultipartFile文件对象
     * @return  文件在云上的地址
     */
    public String upload(MultipartFile file, Integer status) throws IOException, NoSuchAlgorithmException;

    Boolean testAccess(UploadInfo uploadInfo);

    void download(String fileName, String remoteName)throws IOException;
}
